import http from './http.js';

let api = {
    /**
     * 获取导航分类
     */
     async getCategory(data = {}) {
        let url = '/categories';
        const result = await http.post(url, data);
        return result.data;
    },

    /**
     * 获取视频列表
     */
    async getVideoList(data = {}) {
        let url = '/videos';
        const result = await http.post(url, data);
        return result.data;
    },
	
	/**
	 * 获取支付信息
	 */
	async getPayinfo(data = {}) {
	    let url = '/pay';
	    const result = await http.post(url, data);
	    return result.data;
	},

    /**
     * 根据code获取url
     */
    async ms(data = {}, url = '') {
        return  await http.get(url, data)
    },

    /**
     * 获取首页落地信息
     */
    async getHomeFall(data = {}, url = '') {
        return await http.get(url, data);
    },

    /**
     * 获取播放信息
     */
    async getPayVideo(data = {}) {
        let url = '/video-detail';
        return  await http.post(url, data);
    }

};
export default api;